package com.jk.smartelderlycare.controller;

import com.jk.smartelderlycare.dao.LogRepository;
import com.jk.smartelderlycare.entity.Log;
import com.jk.smartelderlycare.pojo.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

/**
 * @author hhk
 * @version 1.0
 * @ClassName logController
 * @program: smart-elderly-care
 * @description: TODO
 * @date 2024/11/12 15:50
 */
@Api(tags = "日志模块")
@RestController
@RequestMapping(value = "logs")
public class logController {

    @Autowired
    private LogRepository logRepository;

    @GetMapping("/getLogs")
    public List<Log> getLogs() {
        List<Log> all = logRepository.findAll();
      return all;
    }







}
